/*
 * @Author: xiangru.xiao xiangru.xiao@mthreads.com
 * @Date: 2023-05-06 14:28:13
 * @LastEditors: xiangru.xiao xiangru.xiao@mthreads.com
 * @LastEditTime: 2023-05-17 14:28:10
 * Copyright (c) 2023 by Moore Threads, All Rights Reserved. 
 */
#ifndef SCORE_H
#define SCORE_H
#include <iostream>
#include <vector>
#include <map>

#define cu_test_type unsigned int

typedef struct {
    double value;
    int weight;
} cu_test_score;

typedef struct {
    double referenceValue;
    unsigned long referenceScore;
} cu_reference_info;

typedef  std::map<cu_test_type, cu_test_score> test_score_map;
class CudaScorePrivate;
class CudaScore
{
public:
    CudaScore();
    ~CudaScore();
    void registerWeight(cu_test_type type,
                        double referenceValue,
                        unsigned long referenceScore);
    void setTesterScore(cu_test_type type, float value, int weight);
    const test_score_map &testScore() const;
    const unsigned long totalScore() const;
private:
    CudaScorePrivate *d_ptr;
};

#endif
